package com.paw.es7.domain;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author: lvzihai
 * @date: 2021/5/25
 **/
@Data
@Document(indexName = "logs-2021.05.25")
public class DayLog {

  @Field(name = "appName", type = FieldType.Keyword)
  private String appName;

  @Field(name = "source_host",type = FieldType.Text)
  private String sourceHost;


  private String timestamp;

  @Field(name = "thread_name",type = FieldType.Text)
  private String threadName;

  private String env;


  @JSONField(name = "class")
  @Field(name = "class",type = FieldType.Text)
  private String klass;

  private String error;

  private String file;

  private String git;

  @Field(name = "level", type = FieldType.Keyword)
  private String level;

  private String message;

  private String method;

  @Field(name = "line_number",type = FieldType.Long)
  private Long lineNumber;

  @Field(name = "logger_name",type = FieldType.Text)
  private String loggerName;

  private String tag;

}
